load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_library(
    name = "libdevice",
    srcs = [
        "audio_track_source_impl.cpp",
        "camera_streamer.cpp",
        "client_handler.cpp",
        "data_channels.cpp",
        "keyboard.cpp",
        "lights_observer.cpp",
        "local_recorder.cpp",
        "recording_manager.cpp",
        "server_connection.cpp",
        "streamer.cpp",
        "video_track_source_impl.cpp",
    ],
    hdrs = [
        "audio_frame_buffer.h",
        "audio_sink.h",
        "audio_track_source_impl.h",
        "camera_controller.h",
        "camera_streamer.h",
        "client_handler.h",
        "connection_observer.h",
        "data_channels.h",
        "keyboard.h",
        "lights_observer.h",
        "local_recorder.h",
        "recording_manager.h",
        "server_connection.h",
        "streamer.h",
        "video_sink.h",
        "video_track_source_impl.h",
    ],
    copts = COPTS,
    linkopts = [
        "-lopus",
    ],
    strip_include_prefix = "//cuttlefish",
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:json",
        "//cuttlefish/common/libs/utils:result",
        "//cuttlefish/common/libs/utils:vsock_connection",
        "//cuttlefish/host/frontend/webrtc/libcommon",
        "//cuttlefish/host/frontend/webrtc_operator/constants:webrtc_signaling_headers",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:custom_actions",
        "//cuttlefish/host/libs/screen_connector:video_frame_buffer",
        "//libbase",
        "@boringssl//:crypto",
        "@jsoncpp",
        "@libvpx",
        "@libwebm//:mkvmuxer",
        "@libwebrtc",
    ],
)

clang_tidy_test(
    name = "libdevice_clang_tidy",
    srcs = [":libdevice"],
    tags = [
        "clang-tidy",
        "clang_tidy",
    ],
)
